﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Summary.master" AutoEventWireup="true"
    CodeFile="MarkingPeriod.aspx.cs" Inherits="School_MarkingPeriod" %>

<asp:Content ID="Content1" ContentPlaceHolderID="DetailHeaderContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="DetailBodyContent" runat="Server">
    <asp:UpdatePanel runat="server" ID="uplMP">
        <ContentTemplate>
            <ajaxToolkit:TabContainer ID="tbcMP" Visible="false" runat="server" ActiveTabIndex="0"
                Width="880px">
                <ajaxToolkit:TabPanel runat="server" HeaderText="MP" ID="tbcMP_Info">
                    <HeaderTemplate>
                        <img src="../Images/Icons/16/Briefcase-icon.png" class="tab_header_img" title="School Info"
                            alt="Entity" />
                        Info
                    </HeaderTemplate>
                    <ContentTemplate>
                        <asp:UpdatePanel runat="server" ID="uplMPForm" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:ValidationSummary ID="vsMPForm" ShowSummary="false" runat="server" />
                                <asp:HiddenField ID="hidMPID" Value="-1" runat="server" />
                                <asp:HiddenField ID="hidParentMPID" Value="-1" runat="server" />
                                <asp:HiddenField ID="hidMPType" Value="-1" runat="server" />
                                <asp:Panel runat="server" ID="pnlMPForm" BackColor="#ffffcc">
                                    <table width="100%" cellpadding="3">
                                        <tr>
                                            <td>
                                                Title
                                            </td>
                                            <td colspan="3">
                                                <asp:TextBox ID="txtTitle" runat="server" Text="" MaxLength="255" Width="450px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvTitle"
                                                    ControlToValidate="txtTitle" ErrorMessage="Require Title." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="MP" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceTitle" TargetControlID="rfvTitle"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Short Name
                                            </td>
                                            <td colspan="3">
                                                <asp:TextBox ID="txtShortName" runat="server" Text="" MaxLength="25" Width="212px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvShortName"
                                                    ControlToValidate="txtShortName" ErrorMessage="Require short name." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="MP" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceShortName" TargetControlID="rfvShortName"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Begins
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtStartDate" runat="server" Text="" MaxLength="11" Width="100px"></asp:TextBox>
                                                <asp:ImageButton runat="server" ID="imgStartDate" ImageUrl="../Images/Icons/16/Calendar-icon.png"
                                                    AlternateText="Click here to display calendar" Style="vertical-align: middle" />
                                                <ajaxToolkit:CalendarExtender ID="txtStartDate_CalendarExtender" runat="server" Enabled="True"
                                                    TargetControlID="txtStartDate" PopupButtonID="imgStartDate" Format="dd-MMM-yyyy">
                                                </ajaxToolkit:CalendarExtender>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvStartDate"
                                                    ControlToValidate="txtStartDate" ErrorMessage="Require begins date." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="MP" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceStartDate" TargetControlID="rfvStartDate"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Ends
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtEndDate" runat="server" Text="" MaxLength="11" Width="100px"></asp:TextBox>
                                                <asp:ImageButton runat="server" ID="imgEndDate" ImageUrl="../Images/Icons/16/Calendar-icon.png"
                                                    AlternateText="Click here to display calendar" Style="vertical-align: middle" />
                                                <ajaxToolkit:CalendarExtender ID="txtEndDate_CalendarExtender" runat="server" Enabled="True"
                                                    TargetControlID="txtEndDate" PopupButtonID="imgEndDate" Format="dd-MMM-yyyy">
                                                </ajaxToolkit:CalendarExtender>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvEndDate"
                                                    ControlToValidate="txtEndDate" ErrorMessage="Require end date." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="MP" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceEndDate" TargetControlID="rfvEndDate"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Grade Posting Begins
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtGPStartDate" runat="server" Text="" MaxLength="11" Width="100px"></asp:TextBox>
                                                <asp:ImageButton runat="server" ID="imgGPStartDate" ImageUrl="../Images/Icons/16/Calendar-icon.png"
                                                    AlternateText="Click here to display calendar" Style="vertical-align: middle" />
                                                <ajaxToolkit:CalendarExtender ID="txtGPStartDate_CalendarExtender" runat="server"
                                                    Enabled="True" TargetControlID="txtGPStartDate" PopupButtonID="imgGPStartDate"
                                                    Format="dd-MMM-yyyy">
                                                </ajaxToolkit:CalendarExtender>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvGPStartDate"
                                                    ControlToValidate="txtGPStartDate" ErrorMessage="Require begins date." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="MP" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceGPStartDate" TargetControlID="rfvGPStartDate"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Grade Posting Ends
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtGPEndDate" runat="server" Text="" MaxLength="11" Width="100px"></asp:TextBox>
                                                <asp:ImageButton runat="server" ID="imgGPEndDate" ImageUrl="../Images/Icons/16/Calendar-icon.png"
                                                    AlternateText="Click here to display calendar" Style="vertical-align: middle" />
                                                <ajaxToolkit:CalendarExtender ID="txtGPEndDate_CalendarExtender" runat="server" Enabled="True"
                                                    TargetControlID="txtGPEndDate" PopupButtonID="imgGPEndDate" Format="dd-MMM-yyyy">
                                                </ajaxToolkit:CalendarExtender>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvGPEndDate"
                                                    ControlToValidate="txtGPEndDate" ErrorMessage="Require end date." Text="" ForeColor="Red"
                                                    Display="None" ValidationGroup="MP" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceGPEndDate" TargetControlID="rfvGPEndDate"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Options
                                            </td>
                                            <td colspan="3">
                                                <asp:CheckBox ID="chkGraded" Text="Graded" runat="server" />&nbsp;
                                                <asp:CheckBox ID="chkExam" Text="Exam" runat="server" />&nbsp;
                                                <asp:CheckBox ID="chkComment" Text="Comments" runat="server" />&nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:Button runat="server" CausesValidation="true" ValidationGroup="MP" CssClass="submitButton"
                                                    ID="btnSubmit" Text="Save" OnClick="btnSubmit_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <ajaxToolkit:RoundedCornersExtender ID="rceForm" runat="server" TargetControlID="pnlMPForm"
                                    Radius="10" Corners="All" BorderColor="Gray" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
            </ajaxToolkit:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel runat="server" ID="uplList">
        <ContentTemplate>
            <asp:Label runat="server" ID="lblMessage" ForeColor="Red" Font-Bold="true" />
            <table cellpadding="3" cellpadding="5">
                <tr>
                    <td valign="top">
                        <div runat="server" id="divYearList">
                            <asp:GridView CssClass="table" runat="server" ID="gvYear" AutoGenerateColumns="false"
                                OnSelectedIndexChanged="gvYear_SelectedIndexChanged" EmptyDataText="No Year."
                                Width="215px">
                                <Columns>
                                    <asp:BoundField DataField="MPID" HeaderText="" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden"
                                        HeaderStyle-CssClass="hidden" SortExpression="MPID" />
                                    <asp:ButtonField HeaderText="Year" ControlStyle-Width="210px" ButtonType="Link" CommandName="Select"
                                        DataTextField="Title" ControlStyle-CssClass="GridColumn" />
                                </Columns>
                                <SelectedRowStyle BackColor="Yellow" />
                            </asp:GridView>
                            <br />
                            <asp:Button runat="server" CausesValidation="false" ValidationGroup="btnNewYear_Click"
                                CssClass="submitButton" ID="btnNewYear" Text="Add" OnClick="btnNewYear_Click" />
                        </div>
                    </td>
                    <td valign="top">
                        <div runat="server" id="divSemesterList" visible="false">
                            <asp:GridView CssClass="table" runat="server" ID="gvSemester" AutoGenerateColumns="false"
                                OnSelectedIndexChanged="gvSemester_SelectedIndexChanged" EmptyDataText="No Semester."
                                Width="215px">
                                <Columns>
                                    <asp:BoundField DataField="MPID" HeaderText="" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden"
                                        HeaderStyle-CssClass="hidden" SortExpression="MPID" />
                                    <asp:ButtonField HeaderText="Semester" ControlStyle-Width="210px" ButtonType="Link"
                                        CommandName="Select" DataTextField="Title" ControlStyle-CssClass="GridColumn" />
                                </Columns>
                                <SelectedRowStyle BackColor="Yellow" />
                            </asp:GridView>
                            <br />
                            <asp:Button runat="server" CausesValidation="false" ValidationGroup="btnNewSemester_Click"
                                CssClass="submitButton" ID="btnNewSemester" Text="Add" OnClick="btnNewSemester_Click" />
                        </div>
                    </td>
                    <td valign="top">
                        <div runat="server" id="divQuarterList" visible="false">
                            <asp:GridView CssClass="table" runat="server" ID="gvQuarter" AutoGenerateColumns="false"
                                OnSelectedIndexChanged="gvQuarter_SelectedIndexChanged" EmptyDataText="No Quarter."
                                Width="215px">
                                <Columns>
                                    <asp:BoundField DataField="MPID" HeaderText="" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden"
                                        HeaderStyle-CssClass="hidden" SortExpression="MPID" />
                                    <asp:ButtonField HeaderText="Quarter" ControlStyle-Width="210px" ButtonType="Link"
                                        CommandName="Select" DataTextField="Title" ControlStyle-CssClass="GridColumn" />
                                </Columns>
                                <SelectedRowStyle BackColor="Yellow" />
                            </asp:GridView>
                            <br />
                            <asp:Button runat="server" CausesValidation="false" ValidationGroup="btnNewQuarter_Click"
                                CssClass="submitButton" ID="btnNewQuarter" Text="Add" OnClick="btnNewQuarter_Click" />
                        </div>
                    </td>
                    <td valign="top">
                        <div runat="server" id="divProgressList" visible="false">
                            <asp:GridView CssClass="table" runat="server" ID="gvProgress" AutoGenerateColumns="false"
                                OnSelectedIndexChanged="gvProgress_SelectedIndexChanged" EmptyDataText="No Progress."
                                Width="215px">
                                <Columns>
                                    <asp:BoundField DataField="MPID" HeaderText="" ControlStyle-CssClass="hidden" ItemStyle-CssClass="hidden"
                                        HeaderStyle-CssClass="hidden" SortExpression="MPID" />
                                    <asp:ButtonField HeaderText="Progress" ControlStyle-Width="210px" ButtonType="Link"
                                        CommandName="Select" DataTextField="Title" ControlStyle-CssClass="GridColumn" />
                                </Columns>
                                <SelectedRowStyle BackColor="Yellow" />
                            </asp:GridView>
                            <br />
                            <asp:Button runat="server" CausesValidation="false" ValidationGroup="btnNewProgress_Click"
                                CssClass="submitButton" ID="btnNewProgress" Text="Add" OnClick="btnNewProgress_Click" />
                        </div>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
